package com.zkk.service.impl;

import com.zkk.dao.UserDao;
import com.zkk.dao.impl.UserDaoImpl;
import com.zkk.pojo.User;
import com.zkk.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {

        private UserDao userDao = new UserDaoImpl();
        @Override
        public User login(User manager) {
            return userDao.login(manager);
        }

    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }

    @Override
    public int deleteById(int id) {

        return userDao.deleteById(id);
    }

    @Override
    public int insertUsr(int id,String username, String password) {
        return userDao.insertUser(id,username,password);
    }

    @Override
    public User findById(int id) {
        return userDao.findById(id);
    }

    @Override
    public int modifyUser(int id,String username,String password) {
        return userDao.modifyUser( id, username, password);
    }
}



